package com.chenxin.transaction.controller;

import com.chenxin.transaction.service.AccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ZhangsanController {

    @Autowired
    private AccountInfoService accountInfoService;

    @RequestMapping("/transfer")
    public String transfer(Double amount) {
        accountInfoService.updateAccountBalance("1", amount);
        return "zhangsan转了" + amount;
    }
}
